import api from './auth.js'

// 获取请求列表
export const getRequestList = (params = {}) => {
  return api.get('/api/api/v1/admin/request/enterprise-requests', { params })
}

// 获取学生申请列表
export const getStudentApplications = (params = {}) => {
  return api.get('/api/api/v1/admin/request/student-applications', { params })
}

// 搜索学生申请列表
export const searchStudentApplications = (params = {}) => {
  return api.get('/api/api/v1/admin/request/student-applications/search', { params })
}

// 获取学生申请详细信息
export const getStudentApplicationDetails = (applicationId) => {
  return api.get(`/api/api/v1/admin/request/student-application-details/${applicationId}`)
}

// 批准学生申请
export const approveStudentApplication = (applicationId) => {
  return api.post(`/api/api/v1/admin/request/approve-student-application/${applicationId}`)
}

// 驳回学生申请
export const rejectStudentApplication = (applicationId, rejectionReason) => {
  return api.post(`/api/api/v1/admin/request/reject-student-application/${applicationId}`, {
    rejectionReason
  })
}

// 获取双方详细信息
export const getBothDetails = (requestId) => {
  return api.get(`/api/api/v1/admin/request/enterprise-request-details/${requestId}`)
}

// 搜索企业申请请求
export const searchEnterpriseRequests = (params = {}) => {
  return api.get('/api/api/v1/admin/request/enterprise-requests/search', { params })
}

// 批准企业申请请求
export const approveEnterpriseRequest = (requestId) => {
  return api.post(`/api/api/v1/admin/request/approve-enterprise-request/${requestId}`)
}

// 驳回企业申请请求
export const rejectEnterpriseRequest = (requestId, rejectionReason) => {
  return api.post(`/api/api/v1/admin/request/reject-enterprise-request/${requestId}`, {
    rejectionReason
  })
}

// 获取数据概览统计信息
export const getDashboardOverview = () => {
  return api.get('/api/api/v1/admin/dashboard/overview')
} 